package net.sinmetal.twitcockpit.controller.admin.config.authUser;

import net.sinmetal.twitcockpit.service.ConfigService;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

/**
 * AdminConfigAuthUserIndexController
 *
 * @author Sinmetal
 *
 */
public class InsertController extends Controller {

    private ConfigService configService = new ConfigService();

    /**
     * DatastoreへAuthUserを登録
     */
    @Override
    public Navigation run() throws Exception {
        String email = requestScope("email");
        configService.addAuthUser(email);
        return redirect("/admin/config/authUser/");
    }
}
